﻿/*
Post-Deployment Script Template							
--------------------------------------------------------------------------------------
 This file contains SQL statements that will be appended to the build script.		
 Use SQLCMD syntax to include a file in the post-deployment script.			
 Example:      :r .\myfile.sql								
 Use SQLCMD syntax to reference a variable in the post-deployment script.		
 Example:      :setvar TableName MyTable							
               SELECT * FROM [$(TableName)]					
--------------------------------------------------------------------------------------
*/
DECLARE @CategoryId1 INT = 0;
DECLARE @CategoryId2 INT = 0;
DECLARE @CategoryId3 INT = 0;
DECLARE @CategoryId4 INT = 0;

INSERT INTO Category (CategoryName) VALUES('eBook');
SET @CategoryId1 = @@IDENTITY
INSERT INTO Category (CategoryName) VALUES('DVD');
SET @CategoryId2 = @@IDENTITY
INSERT INTO Category (CategoryName) VALUES('Book');
SET @CategoryId3 = @@IDENTITY
INSERT INTO Category (CategoryName) VALUES('MP3');
SET @CategoryId4 = @@IDENTITY

INSERT INTO Item (ItemName, CategoryId) VALUES('Item 1', @CategoryId1);
INSERT INTO Item (ItemName, CategoryId) VALUES('Item 2', @CategoryId2);
INSERT INTO Item (ItemName, CategoryId) VALUES('Item 3', @CategoryId4);
INSERT INTO Item (ItemName, CategoryId) VALUES('Item 4', @CategoryId1);
INSERT INTO Item (ItemName, CategoryId) VALUES('Item 5', @CategoryId1);
INSERT INTO Item (ItemName, CategoryId) VALUES('Item 6', @CategoryId2);
INSERT INTO Item (ItemName, CategoryId) VALUES('Item 7', @CategoryId1);
INSERT INTO Item (ItemName, CategoryId) VALUES('Item 8', @CategoryId1);
INSERT INTO Item (ItemName, CategoryId) VALUES('Item 9', @CategoryId3);
INSERT INTO Item (ItemName, CategoryId) VALUES('Item 10', @CategoryId1);
INSERT INTO Item (ItemName, CategoryId) VALUES('Item 11', @CategoryId4);
INSERT INTO Item (ItemName, CategoryId) VALUES('Item 12', @CategoryId1);
INSERT INTO Item (ItemName, CategoryId) VALUES('Item 13', @CategoryId3);
INSERT INTO Item (ItemName, CategoryId) VALUES('Item 14', @CategoryId1);
INSERT INTO Item (ItemName, CategoryId) VALUES('Item 15', @CategoryId1);
INSERT INTO Item (ItemName, CategoryId) VALUES('Item 16', @CategoryId2);
INSERT INTO Item (ItemName, CategoryId) VALUES('Item 17', @CategoryId1);
INSERT INTO Item (ItemName, CategoryId) VALUES('Item 18', @CategoryId1);
INSERT INTO Item (ItemName, CategoryId) VALUES('Item 19', @CategoryId2);
INSERT INTO Item (ItemName, CategoryId) VALUES('Item 20', @CategoryId4);